package com.mentalhealthplatform.teacherV2.service;

import com.mentalhealthplatform.appModels.Reply;
import com.mentalhealthplatform.teacherV2.repository.ReplyRepositoryV2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class ReplyServiceV2 {
    @Autowired
    private ReplyRepositoryV2 replyRepository;

    public Reply saveReply(Reply reply) {
        return replyRepository.save(reply);
    }

    public Optional<Reply> findById(Long id) {
        return replyRepository.findById(id);
    }

    public void deleteReply(Long id) {
        replyRepository.deleteById(id);
    }
}